<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* flex 给子元素设置，设置在父元素中的权重 */
        .parent{
            width: 400px;
            height: 200px;
            background-color: red;
            display: flex;
        }
        .one{
            height: 100px;
            background-color: royalblue;
            flex:1;
        }
        .two{
            height: 100px;
            background-color: springgreen;
            flex:1;
        }
    </style>
</head>
<body>
    <!-- flex给子元素设置 -->
    <div class="parent">
        <div class="one"></div>
        <div class="two"></div>
    </div>
</body>
</html>